package com.lh.job.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lh.common.entity.admin.DoboCode;
import com.lh.common.entity.admin.Order;
import com.lh.common.entity.admin.Period;
import com.lh.common.entity.admin.UserCode;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author FH
 * @ClassName:
 * @Description: (类作用)
 * @date: 2020-05-21 13:48
 */
@Mapper
public interface PeriodMapper extends BaseMapper<Period> {

    Period queryPeriod(Long aid);

    int insertPeriod(Period period);

    List <Period> queryPeriodList();

    BigDecimal sumOrderPrice(Long pid);

    UserCode queryRobotCodeList(int portionNum);

    String queryCode(@Param("pid") Long pid, @Param("portionNum")int portionNum);

    UserCode queryUserCodeList( @Param("code")String code,@Param("pid") Long pid);

    int insertOrder(Order order);

    int insertDoboCode(DoboCode doboCode);

    int updatePeriod(Period period);

    int updatePeriodRobotBuy(Period period);
}
